﻿@{
    Layout = null;
   
    string url = string.Empty;
 

}
@*<header class="am-topbar am-topbar-inverse admin-header">
        <div class="am-topbar-brand">
            <strong>Amaze UI</strong> <small>后台管理模板</small>
        </div>
        <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>
        <div class="am-collapse am-topbar-collapse" id="topbar-collapse">
            <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list">
                <li><a href="javascript:;"><span class="am-icon-envelope-o"></span> 收件箱 <span class="am-badge am-badge-warning">5</span></a></li>
                <li class="am-dropdown" data-am-dropdown>
                    <a class="am-dropdown-toggle" data-am-dropdown-toggle href="javascript:;">
                        <span class="am-icon-users"></span> 管理员 <span class="am-icon-caret-down"></span>
                    </a>
                    <ul class="am-dropdown-content">
                        <li><a href="#"><span class="am-icon-user"></span> 资料</a></li>
                        <li><a href="#"><span class="am-icon-cog"></span> 设置</a></li>
                        <li><a href="#"><span class="am-icon-power-off"></span> 退出</a></li>
                    </ul>
                </li>
                <li class="am-hide-sm-only"><a href="javascript:;" id="admin-fullscreen"><span class="am-icon-arrows-alt"></span> <span class="admin-fullText">开启全屏</span></a></li>
            </ul>
        </div>
    </header>*@
<header class="am-topbar" style="position:fixed;width:100%;z-index:1000;top:0px">
    <h1 class="am-topbar-brand">
        <a href="@Url.Action("Index","Home")">MoreNote</a>
    </h1>
    <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only"
            data-am-collapse="{target: '#doc-topbar-collapse'}">
        <span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span>
    </button>
    <div class="am-collapse am-topbar-collapse" id="doc-topbar-collapse">
        <ul class="am-nav am-nav-pills am-topbar-nav">
            <li @if (Model!=null&&Model.Location.Equals("Home/Index")){
                    @:class="am-active"
                } ><a href="@Url.Action("Index","Home")">首页</a></li>
           
            <li><a href="#">项目</a></li>
            <!--菜单-->
            <li class="am-dropdown" data-am-dropdown>
                <a class="am-dropdown-toggle" data-am-dropdown-toggle href="javascript:;">
                    菜单 <span class="am-icon-caret-down"></span>
                </a>
                <ul class="am-dropdown-content">
                    <li class="am-dropdown-header">标题</li>
                    <li><a href="#">关于我们</a></li>
                    <li><a href="#">关于字体</a></li>
                    <li><a href="#">TIPS</a></li>
                </ul>
            </li>
      
            @* 漫画阅读 *@
            <li @if (Model!=null&&Model.Location.Equals("Pic/Reading")){
                    @:class="am-active"
                } ><a href="@Url.Action("Article","Pic")">漫画阅读</a></li>
            @* 游客登录 *@
            <li @if (Model != null && Model.Location.Equals("User/Login")) { @: class="am-active"
                }>
                @{
                    Random random=new Random();
                    if (Model.user == null)
                    {

                        @:<a href="@Url.Action("Login","User")">游客登录</a>
                    }
                    else
                    {
                        @: <a href="@Url.Action("Index","Admin")"><img src="@url?time=@random.NextDouble()"  style="height: 40px;border-radius: 20px;"/>@Model.user.UserName</a>  
                    }
                }
            </li>
            @* 后台管理 *@
            @*
            <li @if (Model!=null&&Model.Location.Equals("Admin/Index")){
                    @:class="am-active"
                }><a href="@Url.Action("Index","Admin")">后台管理</a></li>
            *@
        </ul>
        <form class="am-topbar-form am-topbar-left am-form-inline am-topbar-right" role="search" action="@Url.Action("Search","Pic")" method="get">
            <div class="am-form-group">
                <input type="text" name="q" class="am-form-field am-input-sm" placeholder="搜索文章">
            </div>
            <button type="submit" class="am-btn am-btn-default am-btn-sm">搜索</button>
        </form>
    </div>
</header>